package org.bbelovic.devel.exercises.sequences.impl;

import java.util.ArrayList;
import java.util.List;

import org.bbelovic.devel.exercises.sequences.SequenceGenerator;

public class DoublyFractalSequenceGenerator implements SequenceGenerator {

    public List<Integer> generateSequence(int n) {
        final List<Integer> result = new ArrayList<Integer>();
        for (int i = 1; i <= n; i++) {
            result.add(i);
            for (int j = 1; j <= i; j++)
            {
                result.add(j);
            }
            
        }
        return result;
    }

}
